import { Global } from "../Global";
import { Entity } from "./def/Entity";

export class StairwayEntity extends Entity {

    handleEvent() {
        // 给动画播放一点时间
        setTimeout(() => {
            switch (this.type) {
                case 'up': {
                    Global.fm.loadNextFloor('up')
                    break
                }
                case 'down': {
                    Global.fm.loadPreFloor('down')
                    break
                }
            }
        }, 200)
        return {
            move: true,
            cartoon: true
        }
    }
}

